package com.yanqu.road.entity.player;

import com.alibaba.fastjson.JSON;
import com.yanqu.road.entity.DataObject;

public class UserDailyData extends DataObject {
    private long userId;                                        //玩家编号
    private long resetTime;                                     //变更时间
    private DailyDetailData dailyDetailData = new DailyDetailData();                    //详细数据

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public long getResetTime() {
        return resetTime;
    }

    public void setResetTime(long resetTime) {
        if(this.resetTime != resetTime) {
            this.resetTime = resetTime;
            setUpdateOption();
        }
    }

    //慎用，不要直接拿对象去操作
    public DailyDetailData getDailyDetailData() {
        return dailyDetailData;
    }
    public String getDailyDetailDataJsonStr(){
        if(null == dailyDetailData){
            return "{}";
        }else {
            return JSON.toJSONString(dailyDetailData);
        }
    }

    public void setDailyDetailData(DailyDetailData dailyDetailData) {
        this.dailyDetailData = dailyDetailData;
        setUpdateOption();
    }

    public long getLiveShowTime(){
        return dailyDetailData.getLiveShowTime();
    }

    public void setLiveShowTime(long time) {
        dailyDetailData.setLiveShowTime(time);
        setUpdateOption();
    }

    public long getWeekCardTrystTimes() {
        return dailyDetailData.getWeekCardTrystTimes();
    }

    public void setWeekCardTrystTimes(long times) {
        dailyDetailData.setWeekCardTrystTimes(times);
        setUpdateOption();
    }

    public long getWeekCardTravelTimes() {
        return dailyDetailData.getWeekCardTravelTimes();
    }

    public void setWeekCardTravelTimes(long times) {
        dailyDetailData.setWeekCardTravelTimes(times);
        setUpdateOption();
    }

    public void resetValue(){
        dailyDetailData.resetValue();
        setUpdateOption();
    }
}
